package org.example.common;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description
 * @Author 魏锴
 * @Date 2024/1/11
 */
public class TokenStorage {
    public static Map<String, String> tokens = new HashMap<>();

    public static String getToken() {
        System.out.println("获取线程" + Thread.currentThread().getName() + "的token");
        return tokens.get(Thread.currentThread().getName());
    }

    public static void setToken(String token) {
        System.out.println("设置线程" + Thread.currentThread().getName() + "的token");
        tokens.put(Thread.currentThread().getName(), token);
    }
}
